const mongoose = require("../db");
const Schema = mongoose.Schema;
const schema = new Schema({
    userid: { type: String },
    proid: { type: String },
    cartid: { type: String },
    orderid: { type: String },
    proname: { type: String },
    proimg: { type: String },
    price: { type: Number },
    num: { type: Number },
    status: { type: Number }, // 0待支付 1待发货 2已完成
    name: { type: String }, // 收货人
    tel: { type: String }, // 手机号
    address: { type: String }, // 地址
    time: { type: String } // 生成订单的唯一时间 时间戳
});
const collection = mongoose.model("Order", schema);
module.exports = collection;
